





const fs=require('fs')
const zlib=require('zlib')
const readSteam=fs.createReadStream('./bigdata.json',{encoding:'utf8'})
// 将bigdata的内容复制生成到一个新的文件中
const writeSteam=fs.createWriteStream('./bigdata3.json.gz',{encoding:'utf8'})
readSteam
.pipe(zlib.createGzip())//文件压缩
.pipe(writeSteam)
